package com.hdax.dm.scheduler.rest.service;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.hdax.dm.api.SchedulerSeatControllerApi;
import com.hdax.dm.entity.order.Order;
import com.hdax.dm.entity.scheduler.SchedulerSeat;
import com.hdax.dm.scheduler.service.SchedulerSeatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SchedulerSeatRestService implements SchedulerSeatControllerApi {

    @Autowired
    private SchedulerSeatService seatService;

    @Override
    public int updateSeat(SchedulerSeat seat) {
        return seatService.updateSeat(seat);
    }

    public boolean seatRollback(String orderNo){
        return seatService.seatRollback(orderNo);
    }

    @Override
    public boolean seatSold(String orderNo) {
        return seatService.soldSeat(orderNo)>0;
    }

    @Override
    public int updateSeatOne(String orderNo) {
        return seatService.updateSeatOne(orderNo);
    }

    @Override
    public int updateSeatTwo(String orderNo) {
        return seatService.updateSeatTwo(orderNo);
    }
}
